<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/support/taglibs.jsp" %>
<stripes:layout-render name="/support/layout/standard.jsp" title="Collaborations" page="collaborations">
<stripes:layout-component name="contents">

  Below is a list providing some basic information for each collaboration.  Click <br />
  on the collaboration name to view the collaboration's information, or one of the <br />
  collaborating organizations to view the organization's information.
  
  <br /><br />
  
  <a href="collaboration_form.jsp">Create Collaboration</a>
  
  <br /><br />

   <jsp:useBean id="isernManager" scope="page"
           class="edu.hawaii.myisern.model.IsernManager"/>
   
<table class="list">
  <tr>
    <th>Name</th>
    <th>Collaborating Organizations</th>
  </tr>
  <c:forEach items="${isernManager.collaborations}" var="collaboration" varStatus="rowstat"> 
    <tr class="${rowstat.count mod 2 == 0 ? "even" : "odd"}">
      <td>
        <stripes:link href="CollaborationForm.action" event="view">
          ${collaboration.name}
          <stripes:param name="id" value="${collaboration.name}"/>
        </stripes:link>       
      </td>
      <td> 
        <c:forEach items="${collaboration.collaboratingOrganizations.collaboratingOrganization}" var="org" varStatus="loop"> 
          <stripes:link href="OrganizationForm.action" event="view">
            ${org}
        	<stripes:param name="id" value="${org}"/>
          </stripes:link>,
        </c:forEach>
      </td>
    </tr>
  </c:forEach>
</table>

<br /><br />
   
</stripes:layout-component>
</stripes:layout-render>
